﻿@using Volo.Abp.AspNetCore.Components.Web
@using EasyAbp.AbpHelper.Gui.Localization
@using EasyAbp.AbpHelper.Gui.AbpCli.Login.Dtos;
@using EasyAbp.AbpHelper.Gui.Blazor.Pages.Shared;
@inherits ExecutableComponentBase
@inject AbpBlazorMessageLocalizerHelper<GuiResource> Lh

<Card Class="mb-4">
    <CardBody>
        <Form>
            <Validations Mode="ValidationMode.Auto" ValidateOnLoad="false">
                <Validation MessageLocalizer="@Lh.Localize">
                    <Field>
                        <FieldLabel>@L["AbpCli_Login:Username"]</FieldLabel>
                        <TextEdit @bind-Text="Input.Username">
                            <Feedback>
                                <ValidationError/>
                            </Feedback>
                        </TextEdit>
                    </Field>
                </Validation>
                <Validation MessageLocalizer="@Lh.Localize">
                    <Field>
                        <FieldLabel>@L["AbpCli_Login:Password"]</FieldLabel>
                        <TextEdit type="password" @bind-Text="Input.Password">
                            <Feedback>
                                <ValidationError/>
                            </Feedback>
                        </TextEdit>
                    </Field>
                </Validation>
                <Validation MessageLocalizer="@Lh.Localize">
                    <Field>
                        <FieldLabel>@L["AbpCli_Login:Organization"]</FieldLabel>
                        <TextEdit @bind-Text="Input.Organization">
                            <Feedback>
                                <ValidationError/>
                            </Feedback>
                        </TextEdit>
                    </Field>
                </Validation>

                <SubmitButton Block="true" Clicked="@ExecuteAsync"/>
            </Validations>
        </Form>
    </CardBody>
</Card>